var numWays = function (n) {
    if (n == 0 || n == 1) return 1;
    let pre = 1;
    let cur = 2;
    for (let i = 3; i <= n; i++) {
        let temp = (pre + cur) % 1000000007;
        pre = cur;
        cur = temp;
    }
    return cur;
};